package com.pattern.strategy_youth.demo3;

import com.pattern.strategy_youth.demo2.Order;

/**
 * @author ：qs
 * @date ：Created in 2022/3/3
 * @description：
 * @modified By：
 */
public class OrderService {

    public double discount(Order order){

        DiscountStrategy discountStrategy = DiscountStrategyFactory.getDiscountStrategy(order.getType());
        return discountStrategy.calDiscount(order);
    }

}
